package com.mlz.mlzmall.ui.dialog;

import android.content.Context;
import android.graphics.drawable.ColorDrawable;
import android.view.Gravity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.mlz.mlzmall.R;

/**
 * describe :
 * Created by Pm on 2016/6/6.
 * PackageName com.mlz.mlzmall.ui.dialog.
 * ProjectName mlzmall_android.
 */

public class SharePopupWindow {
    public static View pw;
    public static PopupWindow pWindow;
    public static RelativeLayout rl_weichat;
    public static RelativeLayout rl_wei_friend;
    public static RelativeLayout rl_qq_share;
    public static RelativeLayout rl_weibo_share;
    public static Button btn_cancal_share;
    public static void showSharePWindow(Context context)
    {
        pw = LayoutInflater.from(context).inflate(R.layout.popwindow_share, null);
        rl_weichat = (RelativeLayout) pw.findViewById(R.id.rl_weichat);
        rl_wei_friend = (RelativeLayout) pw.findViewById(R.id.rl_wei_friend);
        rl_qq_share = (RelativeLayout) pw.findViewById(R.id.rl_qq_share);
        rl_weibo_share = (RelativeLayout) pw.findViewById(R.id.rl_weibo_share);
        btn_cancal_share = (Button) pw.findViewById(R.id.btn_cancal_share);

        pWindow = new PopupWindow(pw, ViewGroup.LayoutParams.MATCH_PARENT,
                ViewGroup.LayoutParams.MATCH_PARENT);//弹框显示大小
        pWindow.setFocusable(true);
        pWindow.setOutsideTouchable(true);

        pWindow.setBackgroundDrawable(new ColorDrawable(0x55000000));//设置背景为透明
        //      pWindow.setAnimationStyle(R.style.AnimationBottom);
        pWindow.showAtLocation(pw, Gravity.CENTER, 0, 0);
    }



}
